//********************************************************************************************************************//
//ORGANIZATION:
//AUTHOR: bpeng(bogers.peng@gmail.com)
//SUMMARY:
//********************************************************************************************************************//
#ifndef NATIVE_DOMAIN_COMPILING_SQL_VARIABLE_H
#define NATIVE_DOMAIN_COMPILING_SQL_VARIABLE_H

#ifndef NATIVE_DOMAIN_COMPILING_COMMON_FIELD_H
#include "Domain/Compiling/Common/Field.h"
#endif

namespace Native { namespace Compiling { namespace Sql
{
    //****************************************************************************************************************//
    //CVariable
    //
    //****************************************************************************************************************//
    NATIVE_DECLARE_CONST_OBJECT(CVariable, C_VARIABLE);
    class NATIVE_LIBRARY_EXPORT CVariable :
        public CField,
        public IEqualTo<CVariable>
    {
        NATIVE_DECLARE_OBJECT;

        NATIVE_DECLARE_PROPERTY(public, public, CString, Name, _name);
        NATIVE_DECLARE_PROPERTY(public, public, CString, Type, _type);
        NATIVE_DECLARE_PROPERTY(public, public, CString, Value, _value);
        NATIVE_DECLARE_PROPERTY(public, public, CBool, Output, _output);

    public:
        CVariable();
        CVariable(C_VARIABLE& that);
        CVariable(C_VARIABLE&& that);
        virtual ~CVariable();
        //{CObject
        virtual wstring ToString() const;
        //}
        //{IEqualTo
        virtual bool operator==(C_VARIABLE& rvalue) const;
        virtual bool operator!=(C_VARIABLE& rvalue) const;
        //{CField
        virtual void Clear();
        virtual CString ToCode() const;
        //}
        C_VARIABLE& operator=(C_VARIABLE& rvalue);
    };
}}}

#endif
